<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div><img src="img/操作元素的内容.jpg" alt=""></div>
    <div><img src="img/操作元素的内容类型.jpg" alt=""></div>
    <h3><span>html()和text()方法设置元素的内容</span></h3>
    <div id="html"></div>
    <div id="html2"></div>
    <div id="text"></div>
    <input type="text" name="uname" value="oop" id="op">
</body>
    <script src="js/jquery-3.5.1.min.js"></script>
    <script>
        $('#html').html('<h2>上海<h2>');
        $('#html2').html('上海');
        var html =  $('#html').html();
        var html2 =  $('#html2').html();
        console.log(html)
        var op=$('#op').val('学习一下')
        console.log(op)


    </script>
</html>